<template>
     <el-table :data="data" style="width: 100%"
        :show-header="false">
        <el-table-column prop="name" label="日期">
          <template slot-scope="scope">
            <div style="cursor: pointer;">编码：{{ scope.row.code }}</div>
            <div style="cursor: pointer;">摘要：{{ scope.row.abstract }}</div>
          </template>
        </el-table-column>
        <el-table-column prop="state" label="姓名">
          <template slot-scope="scope">
            <div style="cursor: pointer;">工单状态：{{ scope.row.state }}</div>
            <div style="cursor: pointer;">时间：{{ scope.row.data }}</div>
          </template>
        </el-table-column>

        <el-table-column prop="link" label="当前环节">
          <template slot-scope="scope">
            <div style="cursor: pointer;">当前环节：{{ scope.row.link }}</div>
            <div style="cursor: pointer;">处理人：{{ scope.row.user }}</div>
          </template>
        </el-table-column>

        <el-table-column prop="pri" label="优先级">
          <template slot-scope="scope">
            <div style="cursor: pointer;">优先级：{{ scope.row.pri }}</div>
            <div style="cursor: pointer;">类别：{{ scope.row.type }}</div>
          </template>
        </el-table-column>
      
      </el-table>
    </template>
    <script>
  export default {
    data(){
      return{
        nowid:0,
        data:[]
      }
    },
    mounted(){
      this.nowid=window.sessionStorage.getItem('id')
      this.$axios({
        url: '/test',
        method: 'get',
        params:{
          id:this.nowid
        }

      }).then((res) => {
        if (res) {
          this.data = [...res.data]
         
          /* for (let i = 0; i < res.data.length; i++) {
            this.data.push(res.data[i]);
            console.log(res.data[i]);
          } 为什么这种方法不行见readme*/
        }

      })
    }
  }
  </script>
    <style scoped></style><style scoped>
    .el-tabs__nav-wrap::after {
      width: auto;
    }
    
    .flex1 {
      display: flex;
    
      justify-content: space-between;
    
    }
    
    .flex2 {
      display: flex;
      justify-content: left;
    
    }
    
    .settingbutton {
      padding: 0px 0px;
      border: 0px solid;
      margin-left: 5px;
    }
    
    ::v-deep .el-table tr {
      background-color: #FFF;
      height: 85px;
    }
    
    ::v-deep .el-pagination {
      padding: 0px 5px;
    }
    
    ::v-deep .el-select {
      margin-right: 10px;
    }
    </style>